import request from '@/utils/request'

// 获取日考勤记录
export function getDailyAttendanceRecords(params) {
  return request({
    url: '/attendance/daily/search',
    method: 'get',
    params
  })
}

// 获取月度考勤报表
export function getMonthlyAttendanceReports(params) {
  return request({
    url: '/attendance/report/monthly',
    method: 'get',
    params
  })
}

// 获取月度考勤汇总（按单位）
export function getMonthlyAttendanceSummaryByTeam(params) {
  return request({
    url: '/attendance/monthly-summary-by-team',
    method: 'get',
    params
  })
}

// 导出月度考勤报表
export function exportMonthlyAttendanceReport(params) {
  return request({
    url: '/attendance/export-monthly-report',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 导出月度考勤汇总报表
export function exportMonthlySummaryReport(params) {
  return request({
    url: '/attendance/export-monthly-summary',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 导出日考勤记录
export function exportDailyAttendanceRecords(params) {
  return request({
    url: '/attendance/export/daily',
    method: 'get',
    params,
    responseType: 'blob'
  })
}